<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSalesmanRankTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('salesman_rank', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('salesmanid')->comment('地推人员id');
            $table->string('salesmanmobile', 20)->comment('地推人员手机号');
            $table->string('salesmanname', 20)->comment('地推人员姓名');
            $table->integer('rank')->comment('排名');
            $table->decimal('money', 16, 2)->comment('金钱');
            $table->integer('lastrank')->comment('最后排名');
            $table->tinyInteger('type')->comment('类型');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('salesman_rank');
    }
}
